#include <stdio.h>
void sum_diff(double op1, double op2, double *psum, double *pdiff);
int main()
{double a,b;double sum=0,diff=0;
scanf("%lf %lf",&a,&b);
double *p=&sum;
double *q=&diff;
sum_diff(a,b,p,q);
printf("%.1f %.1f",sum,diff);
    return 0;
}
void sum_diff(double op1, double op2, double *psum, double *pdiff)
{double sum;
double diff;
sum=op1+op2;
diff=op1-op2;
*psum=sum;
*pdiff=diff;


}
